const { fnm, fnm_s } = require('../test-utils');
/**
 *
 * @param {import('webpack').Compilation} compilation
 */
module.exports = function (compilation) {
  const name = '个人测试 TestCompilationPlugin';
  compilation.hooks.buildModule.tap(name, (module) => {
    console.log('------------- buildModule');
  });

  compilation.hooks.rebuildModule.tap(name, (module) => {
    console.log('------------- rebuildModule');
  });

  compilation.hooks.failedModule.tap(name, (module, error) => {
    console.log('------------- failedModule');
  });

  compilation.hooks.succeedModule.tap(name, (module) => {
    console.log('------------- succeedModule');
  });

  compilation.hooks.finishModules.tapAsync(name, (modules, callback) => {
    console.log('------------- finishModules');
    callback();
  });

  compilation.hooks.finishRebuildingModule.tap(name, (module) => {
    console.log('------------- finishRebuildingModule');
  });
};
